<?php

class GalactusModel {

	public $control = NULL;
	public $pdo = NULL;

	public function __construct($control) {
		$this->control = $control;
		$this->pdo = new PDO("mysql:host=localhost;dbname=GALACTUS", "galactus", "D@t@B@s3_$0l4r1$");
	}

	public function query($sql, $params = NULL) {
		$this->pdo->query("SET NAMES 'utf8'");
		$stmts = $this->pdo->prepare($sql);
		$fail = !$stmts->execute($params);
		return array('fail' => $fail, 'result' => $stmts->fetchAll(PDO::FETCH_ASSOC));
	}

}

?>
